﻿<UserControl x:Class="WPFSolution.UserControls.FunctionEvaluator"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="170" d:DesignWidth="300">
    <StackPanel>
        <DockPanel>
            <Expander Height="130" DockPanel.Dock="Left" ExpandDirection="Right" HorizontalContentAlignment="Center" BorderBrush="{Binding Source={StaticResource chartAreaGraphBackGroundBrush}}" BorderThickness="2">
                <Expander.Header>
                    <StackPanel Height="20" Margin="30,0,-30,0">
                        <StackPanel.RenderTransform>
                            <TransformGroup>
                                <RotateTransform Angle="90"></RotateTransform>
                            </TransformGroup>
                        </StackPanel.RenderTransform>
                        <Label Padding="0" FontSize="16"  FontWeight="Bold">
                            History
                        </Label>
                    </StackPanel>

                </Expander.Header>
                <Expander.Content>
                    <Border BorderThickness="1" CornerRadius="3" BorderBrush="{Binding Source={StaticResource chartAreaGraphBackGroundBrush}}">
                        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                            <ListBox Name="historyContainer" Width="200">

                            </ListBox>
                        </ScrollViewer>
                    </Border>
                </Expander.Content>
            </Expander>
            <Border BorderThickness="2" Height="130" CornerRadius="3" BorderBrush="{Binding Source={StaticResource chartAreaGraphBackGroundBrush}}">
                <TextBlock Name="resultTextBox"  Margin="3" Background="White"></TextBlock>
            </Border>
        </DockPanel>
        <DockPanel Margin="3">
            <Label DockPanel.Dock="Left" VerticalContentAlignment="Center">Enter Function: y=</Label>
            <Button DockPanel.Dock="Right" Width="75" Name="BulidGraphButton" Click="BuildGraphButton_Click">Build Graph</Button>
            <TextBox Name="expressionTextBox" KeyDown="expressionTextBox_KeyDown" Padding="2" VerticalContentAlignment="Center"></TextBox>
        </DockPanel>
    </StackPanel>
</UserControl>
